1. Field of the Invention
The present invention relates to computing devices. More particularly, the present invention relates to a system and method for returning focus to a user interface window within a computer operating system.
2. Description of the Related Art
Most personal computer (PC) systems provide a plurality of techniques for a user to enter data and commands, and to manipulate data. One exemplary technique is for a user to enter data and commands using a keyboard. Other exemplary techniques include use of a mouse, a track ball, and/or a voice-actuated input device. Yet another technique involves a using a digitizing writing pad and a stylus.
In the situation when a conventional computer system has a display screen, and a user selects or clicks on a particular portion of a the display screen using, for example, a mouse, the proper informational context of the selected portion of the display is required by the operating system so that the computer responds as the user expects. For example, when the user clicks on a scrollbar displayed on the display of a conventional computer using the mouse, the underlying application responds as if a scrollbar has been clicked, instead of responding as if a character input was expected.
As another example, in the situation when the user clicks an input interface with the stylus, such as an operating system control field or window, or a softkey keyboard display, the conventional computer sends the input to the last window having focus, instead of responding as if a scrollbar has been clicked. Moreover, for this exemplary situation, the focus state of the computer should be properly returned to the last window having focus.
Focus state, or keyboard focus, as used herein, is a state that an input control interface acquires when a user selects the input control interface. An input control interface loses focus, for example, when the user selects another input control interface. Only one input control interface can have keyboard focus at a time.
Thus, what is needed is a way to determine the information context of a point that is displayed by a computer and that is selected by a user so that the computer responds properly. What is also needed is a technique for returning focus to a user input control interface when the user performs a predetermined action, such as entering a command and/or data into a computer system.
The present invention provides a way to determine the information context of a point selected by a user using a digitizing display screen/writing pad and stylus. The present invention also provides a method for returning focus to a user interface window so that a command and/or data entered by a user are directed to the proper window. Information relating to each user interface window existing, visible and not visible, within a computer operating system is stored in a working database that is different from real-time user interface window information maintained by the computer operating system. A top user interface window is determined at a display coordinate selected by, for example, a digitizing pen. Focus is returned to a last user interface window having focus when the top user interface window is a system user interface window. Additionally, an informational context is determined for the top window, and data entered into the top window is recognized based on the informational context of the top window. The information stored in the working database for each user interface window existing within the computer operating system includes an HWND ClassName, an HWND Style and an ExStyle. Additionally, the information stored in the working database for each user interface window further includes at least one of whether the user interface window is a scrollbar; whether the user interface window is a text input field, whether the user interface window is a generic input field, whether the user interface window is a filename input field, whether the user interface window is an e-mail input field, whether the user interface window is a URL input field; whether an HWND is a button; whether the user interface window is a radio-button; whether the user interface window is a checkbox, and whether the user interface window is a slider.